﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using ControlCenter.Model;
using ControlCenter.Model.WebApiDto;
using ControlCenter.Operation;
using MingYuanYun.Context.Abstractions;

namespace ControlCenter.ApplicationService.Services
{
    /// <summary>
    /// 日志服务
    /// </summary>
    public class LogService : ApplicationServiceBase, ILogService
    {
        private readonly IResultCallbackOperation _resultCallbackOperation;

        /// <summary>
        /// 类初始化
        /// </summary>
        /// <param name="context"></param>
        public LogService(IServiceContext context) : base(context)
        {
            _resultCallbackOperation = this.GetService<IResultCallbackOperation>();
        }

        /// <summary>
        /// 查询日志
        /// </summary>
        /// <returns>返回日志分页集合</returns>
        public async Task<PagedData<LogQueryReturnDto>> Query(LogQueryDto paramDto)
        {
            return await _resultCallbackOperation.QueryLog(paramDto);
        }
    }
}
